package model

// Room 直播间
type Room struct {
	Current
	RoomId      string  `json:"room_id" gorm:"type:varchar(255);comment:'直播房间id'"`
	Title       string  `json:"title" gorm:"type:varchar(255);comment:'标题'"`
	Total       int     `json:"total" gorm:"type:int;comment:'红包总数'"`
	Link        string  `json:"link" gorm:"type:varchar(255);comment:'链接'"`
	Status      string  `json:"status" gorm:"type:enum('1','0');comment:'状态:0=禁用,1=启用'"`
	WatchTime   int     `json:"watch_time" gorm:"type:int;comment:'观看时长'"`
	Rule        string  `json:"rule"`         //阶梯红包（消费金额满足条件，额外获得）
	GrantStatus int     `json:"grant_status"` //发放状态 0未发放 1发放中 2已完成
	GrantTotal  int     `json:"grant_total"`  //已发放数量
	GrantAmount float64 `json:"grant_amount"` //已发放金额
	Date        string  `json:"date"`
}

func (Room) TableName() string {
	return "room"
}
